import Welcome from '../pages/login/index.vue';
const Login = () => import('../pages/login/login.vue');
const Register = () => import('../pages/login/register.vue');
const Tabbar = () => import('../pages/tabbar/index.vue');
const Home = () => import('../pages/home/index.vue');
const Category = () => import('../pages/category/index.vue');
const Bags = () => import('../pages/bags/index.vue');
const Mine = () => import('../pages/mine/index.vue');
const Details = () => import('../pages/details/index.vue');
const Search = () => import('../pages/search/index.vue');

export default [
    {path: '/', component: Welcome, meta: {nologin: true}},
    {path: '/login', component: Login, meta: {nologin: true}},
    {path: '/register', component: Register, meta: {nologin: true}},
    {
        path: '/tabbar',
        name: 'tabbar',
        component: Tabbar,
        redirect: 'home',
        children: [
            {
                path: '/home',
                name: 'home',
                component: Home,
                meta: {
                    keepAlive: true 
                }
            },
            {
                path: '/category',
                name: 'category',
                component: Category
            },
            {
                path: '/bags',
                name: 'bags',
                component: Bags,
                meta: {
                    keepAlive: true 
                }
            },
            {
                path: '/mine',
                name: 'mine',
                component: Mine
            }
        ]
    },
    {path: '/details', component: Details},
    {path: '/search', component: Search}
]